﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using SwAddinHelpers.Base;
using SwAddinHelpers.Contracts;
using SwAddinHelpers.Attributes;
using System.Runtime.InteropServices;
using System.ComponentModel;
using System.ComponentModel.Composition;
using System.ComponentModel.Design;
using System.ComponentModel.Composition.Hosting;
using System.Reflection;

namespace ExternalControls
{
    [ComVisible(true)]
    [ProgId(PROGID)]
    [Export(typeof(IExternalUserControl))]
    //[HostedAsFeatureView(SolidWorks.Interop.swconst.swFeatMgrPane_e.swFeatMgrPaneTop, 0.5, true)]
    public class ExternalFeatureViewTemplateControl1: UserControlBase, IExternalUserControl
    {
        public const string PROGID = "SwExternalControls.ExternalFeatureViewTemplateControl1";

        public ExternalFeatureViewTemplateControl1()
        {
            InitializeComponent();
        }

        public dynamic ExternalUserControl
        {
            get { return this; }
        }

        [SinkMethod(SwAddinHelpers.Sinks.enumEventSink.SW_ActiveModelDocChangeNotify,true)]
        public void SomeMethodToFire(object sender, EventArgs e)
        {

        }

        #region UI Elements
        private System.Windows.Forms.Button button1;
        private void InitializeComponent()
        {
            this.button1 = new System.Windows.Forms.Button();
            this.SuspendLayout();
            // 
            // button1
            // 
            this.button1.Location = new System.Drawing.Point(33, 38);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(75, 60);
            this.button1.TabIndex = 0;
            this.button1.Text = "External Feature View Control";
            this.button1.UseVisualStyleBackColor = true;
            // 
            // Class1
            // 
            this.Controls.Add(this.button1);
            this.Name = "ExternalFeatureViewTemplate1";
            this.ResumeLayout(false);

        }
        #endregion

    }
}
